Major code reorganization #1
                
     Open
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
DO NOT MERGE: work in progress
This PR cleans and reorganizes the code into packages, rather than scattered m-files in
private/andlibrary/. The idea is to organize the code in theforbespackage (`+forbes/' folder), and:forbes.functionspackage (+forbes/+functions/folder): classes encoding the mathematical functions to be used to define problems;forbes.fbepackage (+forbes/+fbe/folder): utility classes for evaluating forward-backward steps and the FBE;forbes.problemspackage (+forbes/+problems/folder): classes representing problems;forbes.utilspackage (+forbes/+utils/folder): various utilities;forbes.testspackage (+forbes/+tests/folder): test scripts.The end user really cares about the
forbes.functionspackage, which is used to constructs the terms defining the problem to be solved.TODO
Many mathematical functions previously in
library/were already ported into theforbes.functionspackage, but not all of them. Furthermore, solvers-related code is still inprivate/. Therefore, before merging, we should:forbes.functionspackage;private/to aforbes.solverspackage.What's next
Solvers should be a lot more readable. I guess one way to do that is to use classes also there: store the state of the algorithm into properties, and have methods
initialize,iterate(which runs one iteration) andstop(that checks the stopping condition).